
cap cd "C:\Users\Paul MAAREK\Dropbox\ProgramEvaluation\PS_Special"

cap cd "/Users/dorsch/Dropbox/Research/ProgramEvaluation/PS_Special"

cap cd "/Users/dorschm/Dropbox/Research/ProgramEvaluation/PS_Special"

cap cd "C:\Users\MBF\Dropbox\ProgramEvaluation\PS_Special"



****************************************************************
********************************************replication figure 1 
****************************************************************

use graph1_repli.dta

** Supply country concentration / top left panel **
twoway (line herfi_country_supply year if year>2013 & year<2020, lpattern(solid)) (line herfi_country_supply_RCT year if year>2013 & year<2020, lpattern(dash)), ytitle(Researcher country concentration index) yscale(range(0 1)) ylabel(0(0.2)1) xtitle(Year) legend(order(1 "All registered experiments" 2 "Field experiments")) scheme(s1mono)

** Demand country concentration / top right panel **
twoway (line herfi_country_demand year if year>2013 & year<2020, lpattern(solid)) (line herfi_country_demand_RCT year if year>2013 & year<2020, lpattern(dash)) , ytitle(Study location country concentration index) ylabel(0(0.2)1) xtitle(Year) legend(order(1 "All registered experiments" 2 "Field experiments")) scheme(s1mono)

** Share supply -- US, EU, non-AID / bottom left panel **
twoway (line share_supply_US year if year>2013 & year<2020, lpattern(solid)) (line share_supply_EU year if year>2013 & year<2020, lpattern(dash)) (line share_supply_AIDs year if year>2013 & year<2020, lpattern(dot)), ytitle(Researcher country share of registered experiments) ylabel(0(0.2)1) xtitle(Year) legend(order(1 "United States" 2 "European Union" 3 "Non Advanced Industrialized Democracies")) scheme(s1mono)

** Share demand -- US, EU, non-AID / bottom right panel  ** 
twoway (line share_demand_US year if year>2013 & year<2020, lpattern(solid)) (line share_demand_EU year if year>2013 & year<2020, lpattern(dash)) (line share_demand_AID year if year>2013 & year<2020, lpattern(dot)), ytitle(Study location share of registered experiments) ylabel(0(0.2)1) xtitle(Year) legend(order(1 "United States" 2 "European Union" 3 "Non Advanced Industrialized Democracies")) scheme(s1mono)

**************************************************************************************************************************

****************************************************************
********************************************replication figure 2 
****************************************************************
clear

use graph1_repli.dta

** Share where demand country is the same as supply country / top left panel **
twoway (line share_same year if year>2013 & year<2020, lpattern(solid)) (line share_same_RCT year if year>2013 & year<2020, lpattern(dash)), ytitle(Share of registered domestic experiments) ylabel(0(0.2)1) xtitle(Year) legend(order(1 "All registered experiments" 2 "Field experiments")) scheme(s1mono)

** Share where supply country is AID and demand country is not AID / top right panel **
twoway (line share_diff year if year>2013 & year<2020, lpattern(solid)) (line share_diff_RCT year if year>2013 & year<2020, lpattern(dash)) , ytitle(Share of registered international experiments) ylabel(0(0.2)1) xtitle(Year) legend(order(1 "All registered experiments" 2 "Field experiments")) scheme(s1mono)


** Share of demand countries are different from supply country where English is the language / bottom left panel **
twoway (line share_english year if year>2013 & year<2020, lpattern(solid)) (line share_english_RCT year if year>2013 & year<2020, lpattern(dash)) , ytitle(Share of international experiments in English) ylabel(0(0.2)1) xtitle(Year) legend(order(1 "All registered experiments" 2 "Field experiments")) scheme(s1mono)


clear

use graph2_repli.dta

sort share_demand

**shares of the top 9 country locations between 2014 and 2019 / Bottom right panel

graph hbar share_demand if country_demand_leader == 1 , ytitle(Share of experiment locations -- top countries) scheme(s1mono) over(demandcountry)



****************************************************************
********************************************replication figure 3 
****************************************************************

clear
use graph1_repli.dta

** Share experiments by Shanghai top 10 universities / Left Panel **
twoway (line share_uni_top_shangai10PS year if year>2013 & year<2020, lpattern(solid)) (line share_uni_top_shangai10PS_RCT year if year>2013 & year<2020, lpattern(dash)), ytitle(Share by Shangai top 10 universities) ylabel(0(0.2)1) xtitle(Year) legend(order(1 "All registered experiments" 2 "Field experiments")) scheme(s1mono)
*graph export "/Users/dorschm/Dropbox/Research/ProgramEvaluation/PS_Special/Figure13b.png", replace

** Number experiments by Shanghai top 10 universities / Right panel **

clear
use graph3_repli.dta, replace

gen obs_uni=1
keep if (uniclean=="HARVARD" | uniclean=="STANFORD" | uniclean=="PRINCETON" | uniclean=="NYU" | uniclean=="LSE"|uniclean=="MICHIGAN" | uniclean=="COLUMBIA" | uniclean=="YALE" | uniclean=="OXFORD" | uniclean=="BERKELEY") 
bys uniclean : egen nbexp2 = sum(obs_uni)
sort uniclean
drop if uniclean[_n] == uniclean[_n-1]

graph hbar nbexp2, ytitle(Number experiments by Shanghai top 10) scheme(s1mono) over(uniclean)
*graph export "/Users/dorschm/Dropbox/Research/ProgramEvaluation/PS_Special/Figure13d.png", replace




****************************************************************
********************************************replication figure 4 
****************************************************************

** Share experiments by pioneer researchers **

clear
use graph1_repli.dta

*Share of pre-registered experiments by political scientists with at least 10 experiment / left panel
twoway (line share_pioneer2 year if year>2013 & year<2020, lpattern(solid)) (line share_pioneer2_RCT year if year>2013 & year<2020, lpattern(dash)) , ytitle(Share by pioneering researcher (at least 10)) ylabel(0(0.2)1) xtitle(Year) legend(order(1 "All registered experiments" 2 "Field experiments")) scheme(s1mono)

*Share of pre-registered experiments by political scientists with at least 5 experiment / right panel
twoway (line share_pioneer year if year>2013 & year<2020, lpattern(solid)) (line share_pioneer_RCT year if year>2013 & year<2020, lpattern(dash)) , ytitle(Shareby pioneering researcher (at least 5)) ylabel(0(0.2)1) xtitle(Year) legend(order(1 "All registered experiments" 2 "Field experiments")) scheme(s1mono)



****************************************************************
********************************************replication figure 5
****************************************************************

** Share of experiments by field and by partner type 

clear
use graph5_repli.dta

** Share of pre-registered experiments by field text code / left panel **
twoway (line share_governance year if year>2013 & year<2020, lpattern(solid)) (line share_electoral year if year>2013 & year<2020, lpattern(dash)) (line share_minority year if year>2013 & year<2020, lpattern(dot)) (line share_policylearning year if year>2013 & year<2020, lpattern(dash_dot)) (line share_postconflict year if year>2013 & year<2020, lpattern(dash_3dot)), ytitle(Share of registered experiments by theme) ylabel(0(0.2)1) xtitle(Year) legend(order(1 "Governance" 2 "Electoral studies" 3 "Minority inclusion" 4 "Policy learning" 5 "Post-conflict")) scheme(s1mono)
 
 ** Share of pre-registered experiments experiments by partner / right panel**
twoway (line share_public year if year>2013 & year<2020, lpattern(solid)) (line share_private year if year>2013 & year<2020, lpattern(dash)), ytitle(Share of registered experiments by partner) ylabel(0(0.2)1) xtitle(Year) legend(order(1 "Public partner" 2 "Private partner" )) scheme(s1mono)

****************************************************************
